<?php
	include("includes/secure.php");
	include("includes/config.php");
	include("includes/class/parameter.class.php");
	
	$parameter = new Parameter(); 

	$param_code	= $_GET['param_code'];
	
	$data = $parameter->getParameterData($param_code);
			
	if(isset($_POST['edit']) && $_POST['edit'] == 1)
	{
		$new_data->param_code			= $param_code;
		$new_data->param_value_admission 			= trim(mysql_real_escape_string($_POST['param_value_admission']));
		$new_data->param_salary			= trim(mysql_real_escape_string($_POST['param_salary']));
		$new_data->param_aporte   		= trim(mysql_real_escape_string($_POST['param_aporte']));
		$new_data->param_admin			= trim(mysql_real_escape_string($_POST['param_admin']));
		$new_data->param_periodo 			= trim(mysql_real_escape_string($_POST['param_periodo']));	
		$new_data->param_aporte_mutual 			= trim(mysql_real_escape_string($_POST['param_aporte_mutual']));	
		$new_data->param_transporte 			= trim(mysql_real_escape_string($_POST['param_transporte']));	
		$new_data->param_contribuciones 			= trim(mysql_real_escape_string($_POST['param_contribuciones']));	
		$new_data->param_description			= trim(mysql_real_escape_string($_POST['param_description']));	
		
		if(!$parameter->updateParameter($new_data))
			echo "<script>alert('Los parametros fueron Actualizados..!!!')</script>";
		else
			echo "<script>alert('no pudo ser actualizados los parametros... lo siento..!!!')</script>";	
		
		
	}


?>